package com.hr.controller;



//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.baomidou.mybatisplus.extension.api.ApiController;
//import com.baomidou.mybatisplus.extension.api.R;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hr.entity.AoaSysMenu;
import com.hr.service.AoaSysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

//import javax.annotation.Resource;
//import java.io.Serializable;
import java.util.List;

/**
 * (AoaSysMenu)表控制层
 *
 * @author makejava
 * @since 2022-06-09 10:40:57
 */
@RestController
@RequestMapping("aoaSysMenu")
public class AoaSysMenuController{
    /**
     * 服务对象
     */
    @Autowired
    private AoaSysMenuService aoaSysMenuService;

    /**
     * 根据角色ID 获取该角色拥有的菜单列表
     * @return
     */
    @GetMapping("/queryListByRoleId")
    public ResponseEntity<List<AoaSysMenu>> queryListByRoleId(
            Long roleId
    ){
        //根据角色ID 获取该角色拥有的菜单列表
        List<AoaSysMenu> list =
                aoaSysMenuService.queryListByRoleId(roleId);

        return ResponseEntity.ok(list);
    }


}

